package cn.lds.j367.dsbank.mapper;

import cn.lds.j367.dsbank.common.condition.CustomerCondition;
import cn.lds.j367.dsbank.common.utils.Pager;
import cn.lds.j367.dsbank.entity.Customer;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CustomerMapper {

    //根据条件分页查询
    List<Customer> selectCustomerByCustomerCondition(@Param("condition") CustomerCondition condition, @Param("pager") Pager pager);

    //根据条件查询客户的数量
    int selectCustomerCount(CustomerCondition condition);

    //根据编号查询
    Customer selectCustomerByCustomerId(Integer customerId);

    //添加客户
    int addCustomer(Customer customer);

    int updateCustomer(Customer customer);

    int deleteCustomer(Integer customerId);
}
